package com.bluesky.plum.uimodels.render.html.components.menu;

import sun.reflect.ReflectionFactory.GetReflectionFactoryAction;

import com.bluesky.javawebbrowser.domain.html.tags.A;
import com.bluesky.javawebbrowser.domain.html.tags.list.LI;
import com.bluesky.plum.uimodels.render.html.PMEServlet;

public class HMenuItem extends
		com.bluesky.plum.uimodels.standard.components.menu.MenuItem {

	protected LI li;

	public HMenuItem() {
		li = new LI();
		li.setAttribute("class", "menu-item");
	}

	@Override
	public Object getNativeComponent() {

		return li;
	}

	@Override
	public void setCaption(String caption) {
		super.setCaption(caption);

		A a = new A(caption,"/plum/oum/processEvent?"+PMEServlet.OUM_EVENT_NAME+"=click&"+PMEServlet.OUM_COMPONENT_ID+"="+id);
		//a.setAttribute("onclick", "")
		
		li.getChildren().clear();
		li.addChild(a);
		
		
	}
}
